
import { app, BrowserWindow } from 'electron'

let mainWindow

app.on('ready', () => {
    mainWindow = new BrowserWindow({
        width: 800,
        height: 600,
        webPreferences: {
            webSecurity: false,
            nodeIntegration: true,
            contextIsolation: false
        }
    })
    if (process.env.ENV_NOW === 'development') {
        mainWindow.loadURL('http://localhost:' + process.env.WEB_PORT)
    } else {
        mainWindow.loadFile('index.html')
    }

    console.log("环境变量", process.env.ENV_NOW)

})
